if($('#slider').length){
    var slider = new SliderUnlock("#slider", {
        successLabelTip: "Success"
      }, function () {
        $.ajax({
          url: '/api/RobotVerification.php',
          type: 'get',
          success: function (res) {
            var data = JSON.parse(res);
            if (data.code == 200) {
              $('#post_hash2').val(data.csrf_key);
              $('#submit2').attr('disabled', false);
            } else {
              alert('server error');
            }
          }
        })
      });
    slider.init();
}
if($('#slider2').length){
    var slider2 = new SliderUnlock("#slider2", {
        successLabelTip: "Success"
      }, function () {
        $.ajax({
          url: '/api/RobotVerification.php',
          type: 'get',
          success: function (res) {
            var data = JSON.parse(res);
            if (data.code == 200) {
              $('#post_hash2').val(data.csrf_key);
              $('#submit2').attr('disabled', false);
            } else {
              alert('server error');
            }
          }
        })
      });
    slider2.init();
}
